3.263 \(\int \frac{(e+f x)^3 \cos ^3(c+d x)}{a+a \sin (c+d x)} \, dx\)

Optimal. Leaf size=219 \[ \frac{3 f^2 (e+f x) \sin ^2(c+d x)}{4 a d^3}-\frac{6 f^2 (e+f x) \sin (c+d x)}{a d^3}+\frac{3 f (e+f x)^2 \cos (c+d x)}{a d^2}-\frac{3 f (e+f x)^2 \sin (c+d x) \cos (c+d x)}{4 a d^2}-\frac{6 f^3 \cos (c+d x)}{a d^4}+\frac{3 f^3 \sin (c+d x) \cos (c+d x)}{8 a d^4}-\frac{(e+f x)^3 \sin ^2(c+d x)}{2 a d}+\frac{(e+f x)^3 \sin (c+d x)}{a d}-\frac{3 f^3 x}{8 a d^3}+\frac{(e+f x)^3}{4 a d} \]

[Out]

(-3*f^3*x)/(8*a*d^3) + (e + f*x)^3/(4*a*d) - (6*f^3*Cos[c + d*x])/(a*d^4) + (3*f*(e + f*x)^2*Cos[c + d*x])/(a*
d^2) - (6*f^2*(e + f*x)*Sin[c + d*x])/(a*d^3) + ((e + f*x)^3*Sin[c + d*x])/(a*d) + (3*f^3*Cos[c + d*x]*Sin[c +
 d*x])/(8*a*d^4) - (3*f*(e + f*x)^2*Cos[c + d*x]*Sin[c + d*x])/(4*a*d^2) + (3*f^2*(e + f*x)*Sin[c + d*x]^2)/(4
*a*d^3) - ((e + f*x)^3*Sin[c + d*x]^2)/(2*a*d)

________________________________________________________________________________________

Rubi [A]  time = 0.242949, antiderivative size = 219, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 8, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {4523, 3296, 2638, 4404, 3311, 32, 2635, 8} \[ \frac{3 f^2 (e+f x) \sin ^2(c+d x)}{4 a d^3}-\frac{6 f^2 (e+f x) \sin (c+d x)}{a d^3}+\frac{3 f (e+f x)^2 \cos (c+d x)}{a d^2}-\frac{3 f (e+f x)^2 \sin (c+d x) \cos (c+d x)}{4 a d^2}-\frac{6 f^3 \cos (c+d x)}{a d^4}+\frac{3 f^3 \sin (c+d x) \cos (c+d x)}{8 a d^4}-\frac{(e+f x)^3 \sin ^2(c+d x)}{2 a d}+\frac{(e+f x)^3 \sin (c+d x)}{a d}-\frac{3 f^3 x}{8 a d^3}+\frac{(e+f x)^3}{4 a d} \]

Antiderivative was successfully verified.

[In]

Int[((e + f*x)^3*Cos[c + d*x]^3)/(a + a*Sin[c + d*x]),x]

[Out]

(-3*f^3*x)/(8*a*d^3) + (e + f*x)^3/(4*a*d) - (6*f^3*Cos[c + d*x])/(a*d^4) + (3*f*(e + f*x)^2*Cos[c + d*x])/(a*
d^2) - (6*f^2*(e + f*x)*Sin[c + d*x])/(a*d^3) + ((e + f*x)^3*Sin[c + d*x])/(a*d) + (3*f^3*Cos[c + d*x]*Sin[c +
 d*x])/(8*a*d^4) - (3*f*(e + f*x)^2*Cos[c + d*x]*Sin[c + d*x])/(4*a*d^2) + (3*f^2*(e + f*x)*Sin[c + d*x]^2)/(4
*a*d^3) - ((e + f*x)^3*Sin[c + d*x]^2)/(2*a*d)

Rule 4523

Int[(Cos[(c_.) + (d_.)*(x_)]^(n_)*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.)*Sin[(c_.) + (d_.)*(x_)]), x_Symbol
] :> Dist[1/a, Int[(e + f*x)^m*Cos[c + d*x]^(n - 2), x], x] - Dist[1/b, Int[(e + f*x)^m*Cos[c + d*x]^(n - 2)*S
in[c + d*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 1] && EqQ[a^2 - b^2, 0]

Rule 3296

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> -Simp[((c + d*x)^m*Cos[e + f*x])/f, x] +
Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 4404

Int[Cos[(a_.) + (b_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.)*Sin[(a_.) + (b_.)*(x_)]^(n_.), x_Symbol] :> Simp[((c +
d*x)^m*Sin[a + b*x]^(n + 1))/(b*(n + 1)), x] - Dist[(d*m)/(b*(n + 1)), Int[(c + d*x)^(m - 1)*Sin[a + b*x]^(n +
 1), x], x] /; FreeQ[{a, b, c, d, n}, x] && IGtQ[m, 0] && NeQ[n, -1]

Rule 3311

Int[((c_.) + (d_.)*(x_))^(m_)*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(d*m*(c + d*x)^(m - 1)*(
b*Sin[e + f*x])^n)/(f^2*n^2), x] + (Dist[(b^2*(n - 1))/n, Int[(c + d*x)^m*(b*Sin[e + f*x])^(n - 2), x], x] - D
ist[(d^2*m*(m - 1))/(f^2*n^2), Int[(c + d*x)^(m - 2)*(b*Sin[e + f*x])^n, x], x] - Simp[(b*(c + d*x)^m*Cos[e +
f*x]*(b*Sin[e + f*x])^(n - 1))/(f*n), x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1] && GtQ[m, 1]

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{(e+f x)^3 \cos ^3(c+d x)}{a+a \sin (c+d x)} \, dx &=\frac{\int (e+f x)^3 \cos (c+d x) \, dx}{a}-\frac{\int (e+f x)^3 \cos (c+d x) \sin (c+d x) \, dx}{a}\\ &=\frac{(e+f x)^3 \sin (c+d x)}{a d}-\frac{(e+f x)^3 \sin ^2(c+d x)}{2 a d}+\frac{(3 f) \int (e+f x)^2 \sin ^2(c+d x) \, dx}{2 a d}-\frac{(3 f) \int (e+f x)^2 \sin (c+d x) \, dx}{a d}\\ &=\frac{3 f (e+f x)^2 \cos (c+d x)}{a d^2}+\frac{(e+f x)^3 \sin (c+d x)}{a d}-\frac{3 f (e+f x)^2 \cos (c+d x) \sin (c+d x)}{4 a d^2}+\frac{3 f^2 (e+f x) \sin ^2(c+d x)}{4 a d^3}-\frac{(e+f x)^3 \sin ^2(c+d x)}{2 a d}+\frac{(3 f) \int (e+f x)^2 \, dx}{4 a d}-\frac{\left (6 f^2\right ) \int (e+f x) \cos (c+d x) \, dx}{a d^2}-\frac{\left (3 f^3\right ) \int \sin ^2(c+d x) \, dx}{4 a d^3}\\ &=\frac{(e+f x)^3}{4 a d}+\frac{3 f (e+f x)^2 \cos (c+d x)}{a d^2}-\frac{6 f^2 (e+f x) \sin (c+d x)}{a d^3}+\frac{(e+f x)^3 \sin (c+d x)}{a d}+\frac{3 f^3 \cos (c+d x) \sin (c+d x)}{8 a d^4}-\frac{3 f (e+f x)^2 \cos (c+d x) \sin (c+d x)}{4 a d^2}+\frac{3 f^2 (e+f x) \sin ^2(c+d x)}{4 a d^3}-\frac{(e+f x)^3 \sin ^2(c+d x)}{2 a d}-\frac{\left (3 f^3\right ) \int 1 \, dx}{8 a d^3}+\frac{\left (6 f^3\right ) \int \sin (c+d x) \, dx}{a d^3}\\ &=-\frac{3 f^3 x}{8 a d^3}+\frac{(e+f x)^3}{4 a d}-\frac{6 f^3 \cos (c+d x)}{a d^4}+\frac{3 f (e+f x)^2 \cos (c+d x)}{a d^2}-\frac{6 f^2 (e+f x) \sin (c+d x)}{a d^3}+\frac{(e+f x)^3 \sin (c+d x)}{a d}+\frac{3 f^3 \cos (c+d x) \sin (c+d x)}{8 a d^4}-\frac{3 f (e+f x)^2 \cos (c+d x) \sin (c+d x)}{4 a d^2}+\frac{3 f^2 (e+f x) \sin ^2(c+d x)}{4 a d^3}-\frac{(e+f x)^3 \sin ^2(c+d x)}{2 a d}\\ \end{align*}

Mathematica [A]  time = 1.14536, size = 132, normalized size = 0.6 \[ \frac{96 f \cos (c+d x) \left (d^2 (e+f x)^2-2 f^2\right )+4 d (e+f x) \cos (2 (c+d x)) \left (2 d^2 (e+f x)^2-3 f^2\right )+4 \sin (c+d x) \left (8 d (e+f x) \left (d^2 (e+f x)^2-6 f^2\right )-3 f \cos (c+d x) \left (2 d^2 (e+f x)^2-f^2\right )\right )}{32 a d^4} \]

Antiderivative was successfully verified.

[In]

Integrate[((e + f*x)^3*Cos[c + d*x]^3)/(a + a*Sin[c + d*x]),x]

[Out]

(96*f*(-2*f^2 + d^2*(e + f*x)^2)*Cos[c + d*x] + 4*d*(e + f*x)*(-3*f^2 + 2*d^2*(e + f*x)^2)*Cos[2*(c + d*x)] +
4*(8*d*(e + f*x)*(-6*f^2 + d^2*(e + f*x)^2) - 3*f*(-f^2 + 2*d^2*(e + f*x)^2)*Cos[c + d*x])*Sin[c + d*x])/(32*a
*d^4)

________________________________________________________________________________________

Maple [B]  time = 0.063, size = 737, normalized size = 3.4 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x+e)^3*cos(d*x+c)^3/(a+a*sin(d*x+c)),x)

[Out]

-1/d^4/a*(f^3*(-1/2*(d*x+c)^3*cos(d*x+c)^2+3/2*(d*x+c)^2*(1/2*cos(d*x+c)*sin(d*x+c)+1/2*d*x+1/2*c)+3/4*(d*x+c)
*cos(d*x+c)^2-3/8*cos(d*x+c)*sin(d*x+c)-3/8*d*x-3/8*c-1/2*(d*x+c)^3)-3*c*f^3*(-1/2*(d*x+c)^2*cos(d*x+c)^2+(d*x
+c)*(1/2*cos(d*x+c)*sin(d*x+c)+1/2*d*x+1/2*c)-1/4*(d*x+c)^2-1/4*sin(d*x+c)^2)+3*f^2*e*d*(-1/2*(d*x+c)^2*cos(d*
x+c)^2+(d*x+c)*(1/2*cos(d*x+c)*sin(d*x+c)+1/2*d*x+1/2*c)-1/4*(d*x+c)^2-1/4*sin(d*x+c)^2)+3*c^2*f^3*(-1/2*(d*x+
c)*cos(d*x+c)^2+1/4*cos(d*x+c)*sin(d*x+c)+1/4*d*x+1/4*c)-6*c*d*e*f^2*(-1/2*(d*x+c)*cos(d*x+c)^2+1/4*cos(d*x+c)
*sin(d*x+c)+1/4*d*x+1/4*c)+3*d^2*e^2*f*(-1/2*(d*x+c)*cos(d*x+c)^2+1/4*cos(d*x+c)*sin(d*x+c)+1/4*d*x+1/4*c)+1/2
*c^3*f^3*cos(d*x+c)^2-3/2*c^2*d*e*f^2*cos(d*x+c)^2+3/2*c*d^2*e^2*f*cos(d*x+c)^2-1/2*d^3*e^3*cos(d*x+c)^2-f^3*(
(d*x+c)^3*sin(d*x+c)+3*(d*x+c)^2*cos(d*x+c)-6*cos(d*x+c)-6*(d*x+c)*sin(d*x+c))+3*c*f^3*((d*x+c)^2*sin(d*x+c)-2
*sin(d*x+c)+2*(d*x+c)*cos(d*x+c))-3*f^2*e*d*((d*x+c)^2*sin(d*x+c)-2*sin(d*x+c)+2*(d*x+c)*cos(d*x+c))-3*c^2*f^3
*(cos(d*x+c)+(d*x+c)*sin(d*x+c))+6*c*d*e*f^2*(cos(d*x+c)+(d*x+c)*sin(d*x+c))-3*d^2*e^2*f*(cos(d*x+c)+(d*x+c)*s
in(d*x+c))+sin(d*x+c)*c^3*f^3-3*sin(d*x+c)*c^2*d*e*f^2+3*sin(d*x+c)*c*d^2*e^2*f-sin(d*x+c)*d^3*e^3)

________________________________________________________________________________________

Maxima [B]  time = 1.19585, size = 772, normalized size = 3.53 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^3*cos(d*x+c)^3/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

-1/16*(8*(sin(d*x + c)^2 - 2*sin(d*x + c))*e^3/a - 24*(sin(d*x + c)^2 - 2*sin(d*x + c))*c*e^2*f/(a*d) + 24*(si
n(d*x + c)^2 - 2*sin(d*x + c))*c^2*e*f^2/(a*d^2) - 8*(sin(d*x + c)^2 - 2*sin(d*x + c))*c^3*f^3/(a*d^3) - 6*(2*
(d*x + c)*cos(2*d*x + 2*c) + 8*(d*x + c)*sin(d*x + c) + 8*cos(d*x + c) - sin(2*d*x + 2*c))*e^2*f/(a*d) + 12*(2
*(d*x + c)*cos(2*d*x + 2*c) + 8*(d*x + c)*sin(d*x + c) + 8*cos(d*x + c) - sin(2*d*x + 2*c))*c*e*f^2/(a*d^2) -
6*(2*(d*x + c)*cos(2*d*x + 2*c) + 8*(d*x + c)*sin(d*x + c) + 8*cos(d*x + c) - sin(2*d*x + 2*c))*c^2*f^3/(a*d^3
) - 6*((2*(d*x + c)^2 - 1)*cos(2*d*x + 2*c) + 16*(d*x + c)*cos(d*x + c) - 2*(d*x + c)*sin(2*d*x + 2*c) + 8*((d
*x + c)^2 - 2)*sin(d*x + c))*e*f^2/(a*d^2) + 6*((2*(d*x + c)^2 - 1)*cos(2*d*x + 2*c) + 16*(d*x + c)*cos(d*x +
c) - 2*(d*x + c)*sin(2*d*x + 2*c) + 8*((d*x + c)^2 - 2)*sin(d*x + c))*c*f^3/(a*d^3) - (2*(2*(d*x + c)^3 - 3*d*
x - 3*c)*cos(2*d*x + 2*c) + 48*((d*x + c)^2 - 2)*cos(d*x + c) - 3*(2*(d*x + c)^2 - 1)*sin(2*d*x + 2*c) + 16*((
d*x + c)^3 - 6*d*x - 6*c)*sin(d*x + c))*f^3/(a*d^3))/d

________________________________________________________________________________________

Fricas [A]  time = 1.69721, size = 570, normalized size = 2.6 \begin{align*} -\frac{2 \, d^{3} f^{3} x^{3} + 6 \, d^{3} e f^{2} x^{2} - 2 \,{\left (2 \, d^{3} f^{3} x^{3} + 6 \, d^{3} e f^{2} x^{2} + 2 \, d^{3} e^{3} - 3 \, d e f^{2} + 3 \,{\left (2 \, d^{3} e^{2} f - d f^{3}\right )} x\right )} \cos \left (d x + c\right )^{2} + 3 \,{\left (2 \, d^{3} e^{2} f - d f^{3}\right )} x - 24 \,{\left (d^{2} f^{3} x^{2} + 2 \, d^{2} e f^{2} x + d^{2} e^{2} f - 2 \, f^{3}\right )} \cos \left (d x + c\right ) -{\left (8 \, d^{3} f^{3} x^{3} + 24 \, d^{3} e f^{2} x^{2} + 8 \, d^{3} e^{3} - 48 \, d e f^{2} + 24 \,{\left (d^{3} e^{2} f - 2 \, d f^{3}\right )} x - 3 \,{\left (2 \, d^{2} f^{3} x^{2} + 4 \, d^{2} e f^{2} x + 2 \, d^{2} e^{2} f - f^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, a d^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^3*cos(d*x+c)^3/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

-1/8*(2*d^3*f^3*x^3 + 6*d^3*e*f^2*x^2 - 2*(2*d^3*f^3*x^3 + 6*d^3*e*f^2*x^2 + 2*d^3*e^3 - 3*d*e*f^2 + 3*(2*d^3*
e^2*f - d*f^3)*x)*cos(d*x + c)^2 + 3*(2*d^3*e^2*f - d*f^3)*x - 24*(d^2*f^3*x^2 + 2*d^2*e*f^2*x + d^2*e^2*f - 2
*f^3)*cos(d*x + c) - (8*d^3*f^3*x^3 + 24*d^3*e*f^2*x^2 + 8*d^3*e^3 - 48*d*e*f^2 + 24*(d^3*e^2*f - 2*d*f^3)*x -
 3*(2*d^2*f^3*x^2 + 4*d^2*e*f^2*x + 2*d^2*e^2*f - f^3)*cos(d*x + c))*sin(d*x + c))/(a*d^4)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)**3*cos(d*x+c)**3/(a+a*sin(d*x+c)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^3*cos(d*x+c)^3/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

Timed out